#define _CRT_SECURE_NO_WARNINGS 1

//struct rq {
//
//    //...
//    unsigned long expired_timestamp;      
//    unsigned long long timestamp_last_tick; 
//    struct task_struct* curr, * idle;       
//    struct mm_struct* prev_mm;             
//
//    struct prio_array* active, * expired, arrays[2]; 
//    //int *pa, *pb, arr[2];
//    int best_expired_prio; 
//
//    atomic_t nr_iowait; 
//
//    //...
//}
//
//struct prio_array {
//    unsigned int nr_active;
//    DECLARE_BITMAP(bitmap, MAX_PRIO + 1); 
//    struct list_head queue[MAX_PRIO];
//};


using namespace std;
#include <iostream>

const int N = 1e6 + 10;
int n, l[N], r[N];

int main()
{
	cin >> n;
	for(int i = 1; i <= n; i++)
	{
		cin >> l[i] >> n[i];
	}
	return 0;
}

